package com.ywh.hilttest.test7

import android.os.Bundle
import androidx.fragment.app.Fragment
import dagger.hilt.android.AndroidEntryPoint
import javax.inject.Inject

@AndroidEntryPoint
class FragmentContextObject : Fragment() {

    //创建对象传Application的Context参数
    @Inject
    lateinit var applicationContextObject: ApplicationContextObject

    //创建对象传Activity的Context参数
    @Inject
    lateinit var activityContextObject: ActivityContextObject

    //创建SDK对象传Application的Context参数
    @Inject
    lateinit var applicationContextSdkObject: ApplicationContextSdkObject

    //创建SDK对象传Activity的Context参数
    @Inject
    lateinit var activityContextSdkObject: ActivityContextSdkObject

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        applicationContextObject.get()
        activityContextObject.get()

        applicationContextSdkObject.get()
        activityContextSdkObject.get()
    }
}